package com.example.md.mddemo.guava.utilites;

import com.google.common.base.Joiner;
import java.util.Arrays;
import java.util.List;

/**
 * Copyright © 2018年 mddemo. All rights reserved.
 *
 * @author 临江仙 hzqiuxm@163.com
 *  连接器 joiner
 * @date 2018/11/11 21:25
 * @Since 1.0.0
 */
public class JoinerTest {

    public static final List<String> stringList = Arrays.asList(
            "Google", "Java", "Guava", "Scala", "Groovy"
    );

    public static final List<String> stringListwithnull = Arrays.asList(
            "Google", "Java", "Guava", "Scala", "Groovy",null
    );


    public static void main(String[] args) {

        //连接List
        testJoinOn();

    }

    public static void  testJoinOn(){

        String join = Joiner.on("#").join(stringList);
        System.out.println(join);
    }
}
